Audio Playback

See also: User Interface

 

Topic Menu

Integrating Audio with Horner OCS

 

Home > Program > Audio

Can also be found in the Project Navigator under the User Interface Node:

 

Audio playback is available on the XL7, EXL10 and XL15+ controllers. The feature requires Cscape 9.60 and Firmware version 14.04 or later. Applications can be configured to play specific audio files based on system events, for example an alarm condition occurring, or a help request when a particular machine fault is active. A set of audio files can be stored on the microSD card in the OCS and each file associated with a trigger bit to be activated for playback. This function requires a speaker device to be connected to the Audio Out jack on the controller. Currently .mp3 and .wav format audio files are supported.

Return to the Top: Audio Playback

 

Audio Playback Configuration

Step 1: Ensure the appropriate controller is selected, see Hardware Configuration for more details.

Step 2: Select the Audio button from the Home Menu or through the Project Navigator, see above. The following screen will appear:

  • Triggers: This register is used to play a particular audio by enabling the corresponding bit address.If more than one audio file is to be used then a block of contiguous variables (bits) is required

  • Status: This register gives the status of the audio files.

1st Status Register - 16 Bits x 2 (XL7, EXL10 & XL15+)

Bit 1 to Bit 8

Volume Control (0-100)

Bit 9

Play Control (1 – Pause and 0 – Play)

Bit 10 to Bit 16

Not Used

 

2nd Status Register - XL7 and EXL10

Bit 1

Cannot open ALSA Lib

Bit 2

Cannot open MP3 Lib

Bit 3

Audio output device cannot be setup

Bit 4

Cannot open input Audio Stream

Bit 5

Memory allocation failed

Bit 6

Buffer is not free

Bit 7

Write Fail

Bit 8

Short Write

Bit 9

Recover Error

Bit 10

Filename Error

Bit 11 to Bit 16

Not Used

 

2nd Status Register - XL15+

Bit 1

Cannot open ALSA Lib (Library Not Used : Library required libasound.so)

Bit 2

Cannot open MP3 Lib (Library Not Used : Library required libmp3dec.so)

Bit 3

Audio output device cannot be setup (Required by libraries)

Bit 4

Cannot open input Audio Stream

(Supported: If the Filename is proper but when the corresponding file is not available in either A or B drives)

Bit 5

Memory allocation failed

(Required by libraries. We are not using any Dynamic memory allocation for files played via gplay)

Bit 6

Buffer is not free (Required by libraries)

Bit 7

Write Fail (Required by libraries)

Bit 8

Short Write (Required by libraries)

Bit 9

Recover Error (Required by libraries)

Bit 10

Filename Error (Supported: If the Filename is Not proper when downloaded from Cscape)

Bit 11 to Bit 16

Not Used

Return to the Top: Audio Playback

 

Audio Files

Index: Index of the audio files will be assigned automatically when audio files are added. See below.

Audio Target Path: This gives information about path of audio file, audio filename and format of the audio files added to the list.

Add: Selecting this button displays the following window, where audio filename with full path needs to be configured.

Modify: Selecting this button allows user to modify the selected file in the list.

Delete: Selecting this button allows user to delete the selected file from the list

Note:  

  1. Audio files are not downloaded from Cscape; they must be present on the Removable Media for playback.

  2. Only one audio file can be played at a time. If multiple bits are simultaneously triggered, only the least significant bit will be acted upon.

  3. mp3 and wav formats are only supported.

  4. 256 audio files can be played.

Return to the Top: Audio Playback